<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
Movie[] allmovieList;
allmovieList=(Movie[])session.getAttribute("allMovies");
%>
<%@page import="com.beans.Movie"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<form id="editmovieForm" name="editmovieForm" method="POST" action="EditMovieServlet" >
<div class ="inputColumn" id = "CartItems"  
				style="text-align: left; border: none; margin: auto;">	
				<% String status = (String)request.getAttribute("status");
			if(status != null){
			%>
			<label style="size: 25; color: green"><%=status%></label>	<%} %>	
			<table align="center" border="1" style="border-style: dashed; background-color: rgb(254,252,180);">
			<%
			if(allmovieList != null)
			{
			%>
				<tr>
				
				<th align="center" style="color:red" bordercolor="red">Movie</th>
				<th align="center" style="color:red" bordercolor="red">Banner</th>
				<th align="center" style="color:red" bordercolor="red">ReleaseDate</th>
				<th align="center" style="color:red" bordercolor="red">Rent in $</th>
				<th align="center" style="color:red" bordercolor="red">Rating</th>
				<th align="center" style="color:red" bordercolor="red">Users Rated</th>
				</tr>
				<% 
				
				for(int i=0;i<allmovieList.length;i++)
				{
				%>
				<tr bordercolor="black" >
				 
				  <td bordercolor="black">
					 	<label id ="MovieName" style="size: 25;"><%=allmovieList[i].getMovieName()%></label> 
					</td>
					<td bordercolor="black">
					 	<label id ="MovieBanner" style="size: 25;"><%=allmovieList[i].getMovieBanner()  %></label> 
					</td>
					<td bordercolor="black">
					 	<label id ="Release" style="size: 25;"><%=allmovieList[i].getReleaseDate()  %></label> 
					</td>
					<td bordercolor="black">
					 	<label id ="Rent" style="size: 25;"><%=allmovieList[i].getRent()  %></label> 
					</td>
					<td bordercolor="black">
					 	<label id ="Rating" style="size: 25;"><%=allmovieList[i].getRating()  %></label> 
					</td>
					<td bordercolor="black">
						<label id="NoRating" style="size: 35;"><%=allmovieList[i].getNo_of_ratings()   %></label>
					</td>
					
				</tr>
				<%
				}
				%>
				
			</table>
			
				<%			
			}
			else
			{
			%>
			<font size="4">There are no movies in database</font>
			<%
			}
			%>
	</div>
</form>
</body>
</html>